//
//  JPDeptM.swift
//
//  Created by 邱仙凯 on 2022/4/11
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public struct JPDeptM: Mappable {

  // MARK: Declaration for string constants to be used to decode and also serialize.
  private struct SerializationKeys {
    static let cDeptName = "c_dept_name"
    static let cDeptId = "c_dept_id"
    static let rowNum = "row_num"
      static let zZcNm = "z_zc_nm"
      static let zZcId = "z_zc_id"
  }

  // MARK: Properties
  public var cDeptName: String?
  public var cDeptId: String?
  public var rowNum: Int?
    public var zZcNm: String?
    public var zZcId: String?

    
  // MARK: ObjectMapper Initializers
  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public init?(map: Map){

  }

  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public mutating func mapping(map: Map) {
    cDeptName <- map[SerializationKeys.cDeptName]
    cDeptId <- (map[SerializationKeys.cDeptId],StringTransform())
    rowNum <- map[SerializationKeys.rowNum]
      zZcNm <- map[SerializationKeys.zZcNm]
      zZcId <- (map[SerializationKeys.zZcId],StringTransform())

      
  }

  /// Generates description of the object in the form of a NSDictionary.
  ///
  /// - returns: A Key value pair containing all valid values in the object.
  public func dictionaryRepresentation() -> [String: Any] {
    var dictionary: [String: Any] = [:]
    if let value = cDeptName { dictionary[SerializationKeys.cDeptName] = value }
    if let value = cDeptId { dictionary[SerializationKeys.cDeptId] = value }
    if let value = rowNum { dictionary[SerializationKeys.rowNum] = value }
    return dictionary
  }

}
